<script src="http://open.web.meitu.com/sources/xiuxiu.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload=function(){
  /*第1个参数是加载编辑器div容器，第2个参数是编辑器类型，第3个参数是div容器宽，第4个参数是div容器高*/
  xiuxiu.embedSWF("altContent",5,"660","440");
  //修改为您自己的图片上传接口
  url = "http://localhost"+"{:U('home/user/uploadface')}";
  xiuxiu.setUploadURL(url);
  xiuxiu.setUploadType(2);
  xiuxiu.setUploadDataFieldName("upload_file");
  xiuxiu.onInit = function ()
  {
    oldface = "http://localhost"+"__ROOT__<?php echo $_SESSION['face'] ?>";
    xiuxiu.loadPhoto(oldface);//修改为要处理的图片url
  }
  xiuxiu.onUploadResponse = function (data)
  {
    
    if(data=='0'){
        alert('上传失败');
    }else{
        face = '__ROOT__ '+data;
        $('#user-avatar_face').attr({'src':face});
        alert('修改成功');
    }
    //alert("上传响应" + data); 可以开启调试
  }
}
</script>
        <div class="wrap">
            <div class="container">
                <div class="row">
                    <include file="Public/menu" />
                    <!-- end #secondary -->
                    <div id="main" class="settings col-md-10 form-horizontal">
                        <h2 class="h3 mt30 post-title">
                            头像修改
                        </h2>
                        <div class="row mt30">
                            <div class="col-md-3 col-md-push-9">
                                
                            </div>
                            <div class="col-md-8 col-md-pull-3">
                                <div id="altContent" style="height:400px;width:600px" ></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
     